﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace InSTEDD.Labs.Geo.Tests
{
    [TestFixture]
    public class DistanceHelperFixture
    {
        [Test]
        public void DecimalIsParseCorrectly()
        {
            string numberstr = DistanceHelper.GetDistanceString(0);
            Assert.AreEqual("0 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyOne()
        {
            string numberstr = DistanceHelper.GetDistanceString(1);
            Assert.AreEqual("1 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyTwo()
        {
            string numberstr = DistanceHelper.GetDistanceString(10);
            Assert.AreEqual("10 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyThree()
        {
            string numberstr = DistanceHelper.GetDistanceString(100);
            Assert.AreEqual("100 Km.", numberstr);
        }

        public void DecimalIsParseCorrectlyFour()
        {
            string numberstr = DistanceHelper.GetDistanceString(1.0);
            Assert.AreEqual("1 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyFive()
        {
            string numberstr = DistanceHelper.GetDistanceString(10.0);
            Assert.AreEqual("10 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlySix()
        {
            string numberstr = DistanceHelper.GetDistanceString(100.0);
            Assert.AreEqual("100 Km.", numberstr);
        }


        [Test]
        public void DecimalIsParseCorrectlyEleven()
        {
            string numberstr = DistanceHelper.GetDistanceString(100);
            Assert.AreEqual("100 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlySeven()
        {
            string numberstr = DistanceHelper.GetDistanceString(1000);
            Assert.AreEqual("1000 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyEigth()
        {
            string numberstr = DistanceHelper.GetDistanceString(156895);
            Assert.AreEqual("156000 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyNine()
        {
            string numberstr = DistanceHelper.GetDistanceString(156895.15);
            Assert.AreEqual("156000 Km.", numberstr);
        }

        [Test]
        public void DecimalIsParseCorrectlyTen()
        {
            string numberstr = DistanceHelper.GetDistanceString(999.99999);
            Assert.AreEqual("999 Km.", numberstr);
        }
    }
}
